import request from '@/utils/request'

// 查询登录角色的预约记录
export function allConsultationList(query) {
  return request({
    url: 'system/consultation/list',
    method: 'get',
    params: query
  })
}

export function getUserExchangeLog(id){
  return request({
    url: 'system/consultation/getUserExchangeLog',
    method: 'get',
    params: {
      id:id
    }
  })
}

export function getVisitRecode(id){
  return request({
    url: 'system/consultation/getVisitRecode',
    method: 'get',
    params: {
      id:id
    }
  })
}
export function addVisitRecord(img,id,describe,drugInformation) {
  const formData = new FormData()

  formData.append('id', id)
  formData.append('img', img)
  formData.append('describe', describe)
  formData.append('drugInformation', drugInformation)
  return request({
    url: 'system/consultation/addVisitRecord',
    headers: { 'Content-Type': 'multipart/form-data' },
    method: 'post',
    data: formData
  })
}
export function download(fileSavePath){
  return request({
    url: 'system/consultation/download',
    method: 'get',
    responseType: 'blob',
    params: {
      fileSavePath:fileSavePath
    }
  })
}
